Skip to content

build(deps): bump rack-protection from 4.2.1 to 4.2.2 - #5695

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/rack-protection-4.2.2
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/rack-protection-4.2.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Bumps rack-protection from 4.2.1 to 4.2.2.

Changelog

Sourced from rack-protection's changelog.

4.2.2 / 2026-11-17

  • Fix: Require a dot before the domain for leading-dot permitted_hosts in Rack::Protection::HostAuthorization

    • .example.org no longer permits hosts that only end in example.org, like evilexample.org
  • Fix: Do not treat a missing Referer as same-origin when Sec-Fetch-Site says the request is cross-site or same-site

    • Affects RemoteToken, JsonCsrf and RemoteReferrer in Rack::Protection
    • Requests with neither header are accepted as before, allow_empty_referrer still defaults to true
  • Fix: Rack::Protection::CookieTossing no longer rejects all requests after one with duplicate session cookies

  • Docs: Document that static files are served through symlinks pointing outside public_folder

  • Fix: Sinatra::QuietLogger no longer hides requests that are routed outside the quiet prefixes

    • /images/../admin is routed to /admin, so it is now logged even with images as a quiet prefix
  • Fix: Set Strict-Transport-Security and Referrer-Policy on responses rejected by other protections

    • Only for apps that use strict_transport or referrer_policy, neither is enabled by default
    • Responses rejected by AuthenticityToken, FormToken or CookieTossing now have both headers, those rejected by RemoteReferrer or SessionHijacking now have Strict-Transport-Security
    • Requests are accepted and rejected as before, so nothing changes with the drop_session reaction, the default in Sinatra, as it does not reject requests
    • A header already set on the response is kept
  • Fix: Run Rack::Protection::PathTraversal before the other protections

    • All protections now see the normalized path, the one the app routes on, where some saw the path as it was sent
    • Only requests with a path that gets normalized are affected: . or .. segments, %2e, %2f, %5c, backslashes or repeated slashes
    • Check code written for the path as it was sent: an allow_if matching /webhooks/[^/]+ no longer matches /webhooks/a%2Fb, as it is called with /webhooks/a/b
    What Before After
    allow_if of AuthenticityToken, FormToken, HttpOrigin and JsonCsrf called with the path as it was sent called with the normalized path
    instrumenter of the protections that ran before PathTraversal notified with the path as it was sent notified with the normalized path
    Per-form tokens of AuthenticityToken and FormToken checked against the path as it was sent checked against the normalized path
    CookieTossing redirected to, and expired cookies for, the path as it was sent uses the normalized path
    RemoteToken, XSSHeader and middleware added with use saw the normalized path unchanged
  • Fix: rack-protection and sinatra-contrib used from a path source no longer fail to load after bundle cache (#2144)

  • Fix: Avoid "method redefined" warnings in Sinatra::Delegator (#2139)

Commits
  • ebcaff2 4.2.2 release
  • a13a321 Set policy headers on rejected responses
  • 1416df2 Normalize the path before other protections run
  • 7813162 Keep CookieTossing's bad cookies per request
  • 34b3bfd Honor Sec-Fetch-Site when the Referer is missing
  • f0e8cb3 Require a dot boundary for leading-dot hosts
  • 0c88089 Fix typos in rack-protection comments
  • 946812b Some slight doc improvements in rack-protection (#2072)
  • 276d392 Slightly improve Rack::Protection::CookieTossing docs (#2094)
  • 44a6b2b Document options and behavior for Rack::Protection::EscapedParams (#2095)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Nov 23, 2026
Bumps [rack-protection](https://github.com/sinatra/sinatra) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md)
- [Commits](sinatra/sinatra@v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: rack-protection
  dependency-version: 4.2.2
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/bundler/rack-protection-4.2.2 branch from d622498 to 2275f05 Compare November 23, 2026 11:32
@dependabot @github

dependabot Bot commented on behalf of github Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Looks like rack-protection is up-to-date now, so this is no longer needed.

@dependabot dependabot Bot closed this Nov 23, 2026
@dependabot
dependabot Bot deleted the dependabot/bundler/rack-protection-4.2.2 branch November 23, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants